-- GENERATED SPELL FOR [Wyrmcaller Vile] --


function spell0_24029(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_24029', 0, 1)
end

function spell1_24029(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15532,pUnit)
pUnit:RegisterEvent('Sorts_24029', 8298, 1)
end

function spell2_24029(pUnit, Event) --@Frost Power,n/a--
pUnit:FullCastSpellOnTarget(43576,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24029', 628, 1)
end

function spell3_24029(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24029', 7000, 1)
end

function Sorts_24029(pUnit, Event)
local choix_sorts_24029 = math.random(0, 3)
if choix_sorts_24029 == 0 then
pUnit:RegisterEvent('spell0_24029', 1, 1)
end
if choix_sorts_24029 == 1 then
pUnit:RegisterEvent('spell1_24029', 1, 1)
end
if choix_sorts_24029 == 2 then
pUnit:RegisterEvent('spell2_24029', 1, 1)
end
if choix_sorts_24029 == 3 then
pUnit:RegisterEvent('spell3_24029', 1, 1)
end
end

function mob24029_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24029', math.random(1500, 3000), 1)
end

function mob24029_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24029_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24029_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24029, 1, 'mob24029_Action')
RegisterUnitEvent(24029, 2, 'mob24029_Leave')
RegisterUnitEvent(24029, 3, 'mob24029_Kill')
RegisterUnitEvent(24029, 4, 'mob24029_Die')
